package com.example.warehouse_manager.mapper;


import com.example.warehouse_manager.entity.ProductType;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author Yang
* @description 针对表【product_type(商品分类表)】的数据库操作Mapper
* @createDate 2024-03-22 17:05:17
* @Entity com.example.warehouse_manager.entity.ProductType
*/
@Mapper
public interface ProductTypeMapper{

    //查询所有商品分类
    public List<ProductType> findAllProductType();

    //根据分类拜编码或者分类名称查询商品的分类
    public ProductType findTypeByCodeOrName(ProductType productType);

    //添加商品分类
    public int insertProductType(ProductType productType);

    //根据分类id或父级id删除分类
    public int removeProductType(Integer typeId);

    //根据分类id修改分类
    public int setProductTypeById(ProductType productType);

}




